<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>合同回寄签收</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select.css">
	<style>
		.content-table-two {
			width: 100%;
			border: 1px solid #ecf2f7;
			border-radius: 4px;
			color: #666;
			font-size: 12px;
			margin-bottom: 10px;
		}
		.content-table-two tbody tr td {
			line-height: 20px;
		}
		.content-table-two tbody tr td:nth-child(1){
			width: 110px;
		}
		.content-table-two tbody tr td:nth-child(2){
			width: 60px;
		}
		.content-table-two tbody tr td:nth-child(3){
			width: 90px;
		}
		.content-table-two tbody tr td:nth-child(4){
			width: 45px;
		}
		.content-table-two tbody tr td:nth-child(5){
			width: 45px;		
		}
		.content-table-two tbody tr td:nth-child(6){
			width: 45px;		
		}
		.content-table-two tbody tr td:nth-child(7){
			width: 60px;
		}
		.content-table-two tbody tr td:nth-child(8){
			width: 85px;
		}
		.content-table-two tbody tr td:nth-child(9){
			width: 60px;
		}
		.content-table-two tbody tr td:nth-child(10){
			width: 85px;
		}
		.content-table-two tbody tr td:nth-child(11){
			width: 100px;
		}
		.content-table-two tbody tr td:nth-child(12){
			width: 110px;
		}
		.color-operation:hover {
		    text-decoration:underline; 
		    cursor: pointer;
		}
		.content-btn {
		    border-top: 1px dashed #e6e6e6;
		    padding-top: 20px;
		    padding-bottom: 5px;
		}
		.export-btn {
		    float: left;
		    margin-top: 0px;
		    margin-right: 12px;
		}
	</style>
</head>
<body>
	<div class="main-content">
		<div class="main-bg">
			<p class="content-title">合同回寄签收</p>
			<div class="content-form">
				<form id = "bindForm" >
					<input type = "hidden" name = "type" value = "1" >
					<ul>
						<li><span class="text-name">快递单号：</span><input type="text" name = "returntracknumber"></li>
						<li><span class="text-name">部门名称：</span><input type="text" name = "addressee"></li>
						<li><span class="text-name">签收状态：</span>
							<select class="multiselect" id="single" name = "status">
								<option value = "">全部</option>
								<option value="0">未签收</option>
								<option value="1">已签收</option>
								<option value="2">拒绝签收</option>
								<option value="4">问题合同回退</option>
							</select></li>	
						<li>
							<button class="btn-style-two" id = "bindSeach" onclick = "return false">搜索</button>
							<i class="btn-operation maleft20">重置</i>
						</li>
					</ul>
				</form>
			</div>
			<div class="content-list">
				<div class="info-list">
					<table class="content-table-two" bindForm = "bindForm" bindClick = "bindSeach" cellspacing="0" cellpadding="0" datatable = "true" dataAction = "/expressInformation/findList">
						<tbody style = "display:none;">
							<th title = "快递单号" name = "tracknumber" type = "string"></th>
							<th title = "快递公司" name = "company" type = "string"></th>
							<th title = "部门名称" name = "address" type = "string"></th>
							<th title = "签收状态" name = "status" type = "dict" dictType = "expressstatus"></th>
							<th title = "退回数量" name = "returnnumber" type = "string"></th>
							<th title = "创建人" name = "createBy" type = "string"></th>
							<th title = "创建时间" name = "createDate" type = "string"></th>
							<th title = "签收人" name = "signBy" type = "string"></th>
							<th title = "签收时间" name = "signDate" type = "string" ></th>
							<th title = "备注" name = "remark" type = "string" ></th>
							<th title = "操作" name = ""></th>
						</tbody>
						<!-- <thead>
							<tr>
								<td>快递单号</td>
								<td>快递公司</td>
								<td>部门名称</td>
								<td>签收状态</td>
								<td>发送数量</td>
								<td>退回数量</td>
								<td>创建人</td>
								<td>创建时间</td>
								<td>签收人</td>
								<td>签收时间</td>
								<td>备注</td>
								<td>操作</td>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td><span class="color-operation" onclick="seeLogistics()">434430999324</span></td>
								<td>顺丰快递</td>
								<td>信息技术中心</td>
								<td>已撤销</td>
								<td>20</td>
								<td>0</td>
								<td>李彤通</td>
								<td>2018-01-12 13:00</td>
								<td>李洪洋</td>
								<td>2018-01-12 13:00</td>
								<td>杭州印刷厂杭州印刷厂</td>
								<td>
									<a href="contractDetailsReturn.html" class="btn-operation clearfix">合同明细</a>
								</td>
							</tr>
						</tbody> -->
					</table>
				</div>
			</div>
		</div>
		<!-- <div class="table-pages clearfix">
			<ul class="pages-list">
				<li><a href=""><</a></li>
				<li><a class="menu-active" href="">1</a></li>
				<li><a href="">2</a></li>
				<li><a href="">3</a></li>
				<li><a href="">...</a></li>
				<li><a href="">20</a></li>
				<li><a href="">></a></li>
			</ul>
		</div> -->
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script type="text/javascript" src = "js/table.js"></script>
	<script type="text/javascript" src = "js/allProduct.js"></script>
	<script>
		$('.multiselect').multiselect({setMaxOptionNum:4,selectedHtmlValue:''});
		$('#single').multiselect({multiple:false,setWidth: 140+'px'});
		function seeLogistics(i){
        	parent.layer.open({
			      type: 2,
			      title: '查看物流',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'seeLogistics.html'
			});
        }
		function  del(){
		
		}
		function signReturn(i){
			parent.setData($("table").getAllData()[i]);
			parent.layer.open({
			      type: 2,
			      title: '回寄签收',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'signReturn.html',
			      end:function(){
						$("table").ECDATable();
				  }
			});
		}
		function cansel(i){
			parent.setData($("table").getAllData()[i]);
			parent.layer.open({
				type: 2,
				title: '撤销签收',
				shadeClose: true,
				shade: 0.2,
				maxmin: true, //开启最大化最小化按钮
				area: ['400px', '250px'],
				content: 'revoke.html',
				end:function(){
					$("table").ECDATable();
				}
			});
		}
		function tableCallBack(my){
			var $tr = my.find("tbody").eq(1).find("tr");
			var allData = my.getAllData();
        	for(var i = 0; i < $tr.length ; i ++){
        		var text = $($tr[i]).find("td").eq(0).text();
        		$($tr[i]).find("td").eq(0).empty().append("<span class=\"color-operation\" onclick=\"seeLogistics(" + i + ")\">" + text + "</span>");
        		var $td = $($tr[i]).find("td").eq(10);
        		var html = "<a href=\"contractDetailsReturn.html\" class=\"btn-operation clearfix\">合同明细</a>";
        		if(allData[i].status*1 == 0){
        			html += "<i class=\"btn-operation1\" onclick=\"signReturn(" + i + ")\">回寄签收</i>";
        			//$($tr[i]).append("<td><i class=\"btn-operation1\" onclick=\"signReturn(" + i + ")\">回寄签收</i></td>");
        		}else if(allData[i].status*1 == 1){
        			html += "<i class=\"btn-operation1\" onclick=\"cansel(" + i + ")\">撤销签收</i>";
        			html += "<i class=\"btn-operation1\" onclick=\"contractReturn(" + i + ")\">问题合同退回</i>";
        		}
        		$($td).append(html);
        	}
        	//my.next().next().remove();
		}
		function contractReturn(i){
			parent.setData($("table").getAllData()[i]);
			parent.layer.open({
			      type: 2,
			      title: '问题合同退回',
			      shadeClose: true,
			      shade: 0.2,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['870px', '450px'],
			      content: 'contractReturn.html',
			      end:function(){
						$("table").ECDATable();
				  }
			});
		}
        function getHeight(){
            var myiframeH=$(".main-content").height();
            var _parent=$(window.parent.document);
            _parent.find('body').css('height',(myiframeH+150)+'px');
            _parent.find('.main-position').css('height',(myiframeH+100)+'px');
        };
        $('.main-content').resize(function(){
            getHeight();
        });
	</script>
</body>
</html>